
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>绘制矩形</title>
    <style>
        svg{
            border: 1px solid #333;
        }
    </style>
</head>
<body>
    <svg width="600" height="600">
        <g transform="translate(100,0)" fill="red" stroke="red">
            <line x1="0" y1="0" x2="100" y2="100"></line>
            <rect x="100" y="100" width="50" height="50"></rect>
        </g>
    </svg>
</body>
</html>